<?php
	require ('../AmazonS3Api.php');
	
	function amazonS3ApiTest() {
		$accessKey = "";
		$secretKey = "";
		$endpoint = "https://gdoss.xstore.ctyun.cn";
		$bucket = "vod-origin-60904cdc-c9fe-4a64-9386-7803f9bff21f";
		
		$presignRequest = AmazonS3Api::presignRequest ( $endpoint, $bucket, $accessKey, $secretKey, "20200512-01.mp4", "360000" );
		var_dump ( $presignRequest );
		
		$acl = "<AccessControlPolicy><Owner><ID></ID><DisplayName></DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Group\"><URI>http://acs.amazonaws.com/groups/global/AllUsers</URI></Grantee><Permission>READ</Permission></Grant></AccessControlList></AccessControlPolicy>";
		AmazonS3Api::setObjectAcl ( $endpoint, $bucket, $accessKey, $secretKey, "20200512-01.mp4",$acl);
		var_dump("setObjectAcl end..."); 
	}
	
	amazonS3ApiTest ();

?>